all files / snackbar/ snackbar.vue

75% Statements 9/12
100% Branches 4/4
25% Functions 1/4
57.14% Lines 4/7
1 branch Ignored     
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50                        1× 1× 1×                                                                      
//
//
//
//
//
//
//
//
//
//
//
 
import flatButton from '../flatButton'
import {getZIndex} from '../internal/popup/utils'
import clickoutside from '../internal/clickoutside'
export default {
  name: 'mu-snackbar',
  props: {
    action: {
      type: String
    },
    actionColor: {
      type: String
    },
    message: {
      type: String
    }
  },
  data () {
    return {
      zIndex: getZIndex()
    }
  },
  methods: {
    clickOutSide () {
      this.$emit('close', 'clickOutSide')
    },
    handleActionClick () {
      this.$emit('actionClick')
    }
  },
  components: {
    'flat-button': flatButton
  },
  directives: {
    clickoutside
  }
}